//
//  UIButton+HMTabarButton.m
//  OC新浪微博
//
//  Created by wyman on 16/4/13.
//  Copyright © 2016年 wyman. All rights reserved.
//

#import "UIButton+HMTabarButton.h"

@implementation UIButton (HMTabarButton)
+(instancetype)setBtnwithimage:(NSString *)iamgeName target:(id)target selector:(SEL)selctor
{
    UIButton *button = [[UIButton alloc]init];
    
    
    [button setImage:[UIImage imageNamed:iamgeName] forState:UIControlStateNormal];
    
    [button setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@_highlighted",iamgeName]] forState:UIControlStateNormal];
    
    [button sizeToFit];
    
    [button addTarget:target action:selctor forControlEvents:UIControlEventTouchUpInside];
    
    return button;

}


@end
